<?php

namespace app\common\validate;

use think\Validate;

class Cart extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'page|页码'           => 'require',
        'pageCount|页面数量'  => 'require',
        'productId|商品'      => 'require',
        'productNum|商品数量' => 'require',
        'cartId|购物车ID'     => 'require',

    ];
    /**
     * 提示消息
     */
    protected $message = [
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'list'   => ['page', 'pageCount'],
        'add'    => ['productId', 'productNum'],
        'update' => ['cartId', 'productId', 'productNum'],
        'del'    => ['cartId'],
    ];
}